﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DIBestPractice.Domain;
using DIBestPractice.Repository.Store;

namespace DIBestPractice.Repository
{
    public class UserRepository:IUserRepository
    {
        private readonly IDBStore<User> _dbStore;

        public UserRepository(IDBStore<User> dbStore)
        {
            _dbStore = dbStore;
        }

        public User Get(Guid id)
        {
            return _dbStore.Get(id);
        }

        public void Save(User user)
        {
            _dbStore.Save(user);
        }

        public void Remove(Guid id)
        {
            _dbStore.Remove(id);
        }

        public List<User> GetAll()
        {
            return _dbStore.GetAll();
        }
    }
}
